

// main_process.js
const child_process = require('child_process');
const processMaster = child_process.fork(__dirname + '/child_process.js');

processMaster.send('Hello from master');

processMaster.on('message', (msg) => {
    console.log('Master:' + msg);
});
